﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using QuanLyDuocPham.Controllers.QuanLyHeThong.DanhMuc;

namespace QuanLyDuocPham.View.QuanLyHeThong.DanhMuc
{
    /// <summary>
    /// Interaction logic for KHO_Edit_View.xaml
    /// </summary>
    public partial class KHO_Edit_View : Window
    {
        public KHO_Edit_View()
        {
            InitializeComponent();
        }
        public delegate void added();
        public added done;

        string ma_kho;


        public string _ma_kho
        {
            set
            {
                ma_kho = value;
            }
        }
        KHO_Control khoctrl = new KHO_Control();
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            khoctrl.loadForm_Edit(ma_kho,  txtTen_Kho, txtDia_Chi, txtDien_Thoai, txtFax, txtGhi_Chu);
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            khoctrl.updateData(ma_kho, txtTen_Kho, txtDia_Chi, txtDien_Thoai, txtFax, txtGhi_Chu);
            if (done != null)
            {
                done();
            }
        }

        private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
